<template>
  <div class="w-page w-quesPage">
    <div class="w-head" :style="{backgroundImage: 'url(' + bgimg + ')' }">
      <p class="w-headcon flex vc">
        <span class="w-shu"></span>
        <span>常见问题/FAQs</span>
      </p>
    </div>
    <div class="w-conbox">
      <div class="w-con">
        <div class="w-conItem">
          <van-collapse v-model="activeNames" :border='false' >
            <van-collapse-item :name="v.id" v-for="(v,i) in list" :is-link="false" :key="i">
              <div slot="title">
                <div class="flex">
                  <img src="../assets/img/first/iconques.png" alt="" class="w-icon">
                  <span class="w-text">{{v.title}}</span>
                </div>
              </div>
              <div class="flex">
                <img src="../assets/img/first/iconans.png" alt="" class="w-icon">
                <p class="w-ansText" v-html="v.content"></p>
              </div>
            </van-collapse-item>
          </van-collapse>
        </div>

      </div>
    </div>

  </div>
</template>

<script>
import { articleClassList } from '@/api/article'
import {
  Collapse,
  CollapseItem
} from 'vant'

export default {
  components: {
    [Collapse.name]: Collapse,
    [CollapseItem.name]: CollapseItem
  },
  data () {
    return {
      bgimg: require('../assets/img/first/ques.png'),
      activeNames: ['1'],
      list: []
    }
  },
  created () {
    articleClassList({ classId: 3, size: 0 }).then(response => {
      console.log(response)
      this.list = response.data.list
    })
  },
  methods: {
  }
}
</script>
<style>
  .w-quesPage .van-cell {
    /* padding-left: 0; */
    padding-right: 10px;
  }
</style>
<style scoped>
  .w-page {
    width: 100vw;
    overflow: hidden;
    background: #E1E0DF;
    min-height: 100vh;

  }

  .w-head {
    width: 100vw;
    height: 94px;
    background-size: cover;
    background-position: center;
  }

  .w-shu {
    background: #F5D8BB;
    height: 18px;
    width: 2px;
    display: block;
    border-radius: 10px;
    margin: 0 10px;
  }

  .w-headcon {
    padding: 0 15px;
    padding-top: 17px;
    font-size: 18px;
    color: #fff;
  }

  .w-headcon span {
    display: block;
  }

  .w-conbox {
    width: 97vw;
    margin: 0 auto;
    margin-top: -20px;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    padding: 12px;
  }

  .w-con {
    overflow: scroll;
    height: 84vh;
  }

  .w-conItem {
  }

  .w-icon {
    width: 18px;
    height: 18px;
    margin-right: 6px;
    display: block;
  }

  .w-text {
    font-size: 15px;
    text-align: justify;
    color: #313131;
  }

  .w-ansText {
    font-size: 14px;
    color: #707070;
    text-align: justify;
  }
</style>
